package com.zerox.controller;

import com.zerox.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

@Controller
public class HelloController {

//    @Value("${person.name}")
//    private String name;
//
//    @Value("${person.birthday}")
//    private String birthday;
    @Autowired
    private Person person;

    @RequestMapping("hello")
    @ResponseBody
    public String hello() {
        return "hello"+person.getName()+"，出生日期："+ person.getBirthday()+"，爱好"+Arrays.toString(person.getHobby().toArray());
    }
}
